cient Dynamic Dispatch without Virtual Function Tables
نویسنده
چکیده
SmallEi el is an Ei el compiler which uses a fast simple type inference mechanism to remove most late binding calls, replacing them by static bindings. Starting from the system's entry point, it compiles only statically living code, which saves compiling and then removing dead code. As the whole system is analyzed at compile time, multiple inheritance and genericity do not cause any overhead. SmallEi el features a coding scheme which eliminates the need for virtual function tables. Dynamic dispatch is implemented without any array access but uses a simple static binary branch code. We show that this implementation makes it possible to use modern hardware very e ciently. It also allows us to inline more calls even when dynamic dispatch is required. Some more dispatch sites are removed after the type inference algorithm has been performed, if the di erent branches of a dispatch site lead to the same code. The advantage of this approach is that it greatly speeds up execution time and considerably decreases the amount of generated code.
منابع مشابه
Eecient Dynamic Dispatch without Virtual Function Tables. the Smalleiiel Compiler
SmallEi el is an Ei el compiler which uses a fast simple type inference mechanism to remove most late binding calls, replacing them by static bindings. Starting from the system's entry point, it compiles only statically living code, which saves compiling and then removing dead code. As the whole system is analyzed at compile time, multiple inheritance and genericity do not cause any overhead. S...
متن کاملThe Stability of Two-Station Multitype Fluid Networks
This paper studies the uid models of two-station multiclass queueing networks with deterministic routing. A uid model is globally stable if the uid network eventually empties under each nonidling dispatch policy. We explicitly characterize the global stability region in terms of the arrival and service rates. We show that the global stability region is de+ned by the nominal workload conditions ...
متن کاملFast Algorithms for Compressed Multi-Method Dispatch Tables Generation
The eeciency of dynamic dispatch is a major impediment to the adoption of multi-methods in object-oriented languages. In this paper, we propose a simple multi-method dispatch scheme based on compressed dispatch tables. This scheme is applicable to any object-oriented language using a method precedence order that satisses a speciic monotonous property (e.g., as Cecil and Dylan), and guarantees t...
متن کاملReport on language support for Multi-Methods and Open-Methods for C++
Multiple dispatch – the selection of a function to be invoked based on the dynamic type of two or more arguments – is a solution to several classical problems in object-oriented programming. We present the rationale, design, and implementation of a language feature, called open multi-methods, for C++. Open multi-methods support both repeated and virtual inheritance and our call resolution rules...
متن کاملCompact Dispatch Tables for Dynamically Typed Object Oriented Languages
Dynamically typed object-oriented languages must perform dynamic binding for most message sends. Typically this is slow. A number of papers have reported on attempts to adapt C++-style selector table indexing to dynamically typed languages, but it is difficul to generate space-efficient tables. Our algorithm generates considerably smaller dispatch tables for languages with single inheritance th...
متن کامل